{% extends "base.html" %}  
{% block title %}
	<title>发表文章</title>
	<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"/>
{% endblock %}

{% block content %}
<div class="blogs">
    <form action="/Release/" method="POST" class="form-horizontal" enctype="multipart/form-data">
    {% csrf_token %}
        <div style="width:800px;margin-top:50px;">
			<input type="text" name="articleId" value="{{Id}}" style="visibility:hidden;">
			<div class="form-group">
			  <label class="col-sm-2 control-label">名称：</label>
			  <div class="col-sm-10">
				 <input type="text" name="articleName" value="{{Name}}" class="form-control" placeholder="请输入文章标题">
			  </div>
		   </div>
		   <div class="form-group">
			  <label class="col-sm-2 control-label">Logo：</label>
			  <div class="col-sm-3">
				<input type="file" name="articleImg" id="articleImg" accept="image/jpeg">
			  </div>
			  <div class="col-sm-3">
				<label>{{Img}}</label>
				<input type="text" name="articleLogo" value="{{Img}}" style="visibility:hidden;">
			  </div>
		   </div>
		   <div class="form-group">
			<label class="col-sm-2 control-label">描述</label>
			<div class="col-sm-10">
				<textarea class="form-control" rows="3" name="articleDes">{{Des}}</textarea>
			</div>
		  </div>
			<div class="form-group">
				<label class="col-sm-2 control-label">Type：</label>
			  <div class="col-sm-10">
			  {%if type_list%}
				   {%for item in type_list%}
					   {%if item.Name == Type%}
						<label class="checkbox-inline">
						  <input type="radio" name="articleType" value="{{item.Name}}" checked="checked"> {{item.Name}}
						</label>
					   {%else%}
						<label class="checkbox-inline">
						  <input type="radio" name="articleType" value="{{item.Name}}" > {{item.Name}}
						</label>
						{%endif%}
					{%endfor%}
			  {%endif%}
			  </div>
		   </div>
            <br/>
            <script id="editor" type="text/plain" name="articleContent" style="width:auto;height:500px;margin-left:30px;">{% autoescape off %}{{Content}}{% endautoescape %}</script>
			<br/>
			<button type="submit" class="btn btn-default" style="float:right;">提交</button>
        </div>
    </form>
	</div>
	<br/>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/static/UE/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="/static/UE/ueditor.all.min.js"> </script>
	<script type="text/javascript" charset="utf-8" src="/static/UE/lang/zh-cn/zh-cn.js"></script>
	<script type="text/javascript">
	var ue = UE.getEditor('editor');
	</script>
	
	
{% endblock %}